-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python] Add example for gemini 1.5 #24
Conversation
Someone is attempting to deploy a commit to the E2B Team on Vercel. A member of the Team first needs to authorize it. |
Hi @gabrielchua, have you actually ran the code? There are several errors that prevent it from actually working |
Hi @mlejva yes - I did run the code - https://github.com/gabrielchua/e2b-cookbook/blob/main/examples/gemini-1.5-code-interpreter/gemini-1.5.ipynb What are the errors you’re getting? i realised it may not be clear that this is using Google AI Studio, and not Vertex AI. The former’s for non-GCP users |
I'm getting an error related to how you're passing the import google.generativeai as genai
# Configure the API key
genai.configure(api_key=GOOGLE_API_KEY)
# Initialize the model, and pass the system instruction and tools
model = genai.GenerativeModel(model_name=MODEL_NAME,
system_instruction=SYSTEM_PROMPT,
tools=[execute_python_code])
|
Locally, I'm using Python
I've tried the notebook in Co-Lab too (see here). The co-lab runtime uses Python (same as above)
|
Hey @gabrielchua ! Otherwise the code looks good! |
Added an example for Gemini 1.5, based on the Google Generative AI SDK.